export default {
  routes: [
    // 后台首页内容
    {
      path: '/frist',
      meta: { name: '后台首页', icon: 'icon-shouye' },
      isVisible: true,
      component: () =>
        import(/* webpackChunkName: "frist" */ '../views/first/index.vue')
    },
    // 订单内容
    {
      path: '/order',
      meta: {
        name: '订单内容',
        role: ['super', 'normal'],
        icon: 'icon-icon-'
      },
      isVisible: true,
      component: () =>
        import(/* webpackChunkName: "order" */ '../views/order/index.vue'),
      redirect: '/order/list',
      children: [
        {
          path: '/order/list',
          meta: { name: '订单列表' },
          isVisible: true,
          component: () =>
            import(
              /* webpackChunkName: "order" */ '../views/order/orderlist.vue'
            )
        },
        {
          path: '/order/edit',
          meta: { name: '编辑订单', role: ['super'] },
          isVisible: false,
          component: () =>
            import(
              /* webpackChunkName: "order" */ '../views/order/orderEdit.vue'
            )
        },
        {
          path: '/order/look',
          meta: { name: '查看订单' },
          isVisible: false,
          component: () =>
            import(/* webpackChunkName: "order" */ '../views/order/look.vue')
        }
      ]
    },
    // 商品内容
    {
      path: '/goods',
      meta: { name: '商品管理', icon: 'icon-shangpin' },
      isVisible: true,
      component: () =>
        import(/* webpackChunkName: "goods" */ '../views/goods/index.vue'),
      redirect: '/goods/list',
      children: [
        {
          path: '/goods/list',
          meta: { name: '商品列表' },
          isVisible: true,
          component: () =>
            import(/* webpackChunkName: "list" */ '../views/goods/list.vue')
        },
        {
          path: '/goods/add',
          meta: { name: '商品添加' },
          isVisible: true,
          component: () =>
            import(/* webpackChunkName: "add" */ '../views/goods/add.vue')
        },
        {
          path: '/goods/fen',
          meta: { name: '商品分类' },
          isVisible: true,
          component: () =>
            import(/* webpackChunkName: "fen" */ '../views/goods/fen.vue')
        }
      ]
    },
    // 店铺管理
    {
      path: '/shop',
      meta: { name: '店铺管理', role: ['super'], icon: 'icon-dianpu' },
      isVisible: true,
      component: () =>
        import(/* webpackChunkName: "order" */ '../views/shop/index.vue')
    },
    // 账号管理
    {
      path: '/num',
      meta: {
        name: '账号管理',
        role: ['super', 'normal'],
        icon: 'icon-zhanghao'
      },
      isVisible: true,
      component: () =>
        import(/* webpackChunkName: "num" */ '../views/num/index.vue'),
      redirect: '/num/list',
      children: [
        {
          path: '/num/list',
          meta: { name: '账号列表', role: ['super'] },
          isVisible: true,
          component: () =>
            import(/* webpackChunkName: "list" */ '../views/num/list.vue')
        },
        {
          path: '/num/add',
          meta: { name: '账号添加', role: ['super'] },
          isVisible: true,
          component: () =>
            import(/* webpackChunkName: "add" */ '../views/num/add.vue')
        },
        {
          path: '/num/revise',
          meta: { name: '账号修改' },
          isVisible: true,
          component: () =>
            import(/* webpackChunkName: "fen" */ '../views/num/revise.vue')
        }
      ]
    },
    // 统计图
    {
      path: '/census',
      meta: { name: '销售统计', role: ['super'], icon: 'icon-tongji' },
      isVisible: true,
      component: () =>
        import(/* webpackChunkName: "census" */ '../views/census/index.vue'),
      redirect: '/census/ding',
      children: [
        {
          path: '/census/ding',
          meta: { name: '订单统计图' },
          isVisible: true,
          component: () =>
            import(/* webpackChunkName: "list" */ '../views/census/ding.vue')
        },
        {
          path: '/census/shopping',
          meta: { name: '商品统计图' },
          isVisible: true,
          component: () =>
            import(/* webpackChunkName: "add" */ '../views/census/shopping.vue')
        }
      ]
    },
    // 个人中心
    {
      path: '/ge',
      meta: { name: '个人中心' },
      isVisible: false,
      component: () =>
        import(/* webpackChunkName: "order" */ '../views/ge/index.vue')
    }
  ]
}
